<template>
    <div class="home">
        <p>年龄：{{ $store.state.age }}</p>
        <p>getters年龄：{{ $store.getters.ageDouble }}</p>
        <p>getters年龄：{{ $store.getters.ageDouble }}</p>
        <button @click="$store.commit('changeAge', 10)">点击</button>
        <button @click="$store.dispatch('testAge', 10)">点击</button>
    </div>
</template>

<script>
// @ is an alias to /src

export default {
    name: "Home",
    components: {
    },
    mounted () {
        console.log(this.$store);
    }
};
</script>
